package cn.kgc.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: mosin
 * @version: v1.0  2022/4/28
 */
@Controller
@RequestMapping("hello")
public class HelloController {

   @RequestMapping ("h1")
    public String  test01(){
        System.out.println("h1请求被接收");
        //返回视图名   转发
        return "hello";  // 视图的逻辑名    ->请求视图解析器  - >    prefix+hello+suffix  - >  /static/hello.jsp
    }

    @RequestMapping("h2")
    public String  test02(){
        System.out.println("h2请求被接收");
        return "index";   //  prefix+hello+suffix  - >  /static/index.jsp
    }


}
